home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0399 / 377 < prev    next >
Internet Message Format  |  1994-08-27  |  2KB

  1. Date: Thu, 15 Jul 93 19:25:41 -0400
  2. From: "Nicholas S Castellano" <entropy@terminator.rs.itd.umich.edu>
  3. To: nox@jelal.north.de
  4. In-Reply-To: Juergen Lock's message of Wed, 14 Jul 93 17:22:36 CES <9307141522.AA00256@jelal.north.de>
  5. Subject: `hanging' pipes and zeroed tty pgroups...
  6.  
  7. > quoted from dosmem.c, line 707:
  8. >
  9. >>/* release the controlling terminal, if we're a process group leader */
  10. >>    fp = curproc->handle[-1];
  11. >>    if (fp && is_terminal(fp) && curproc->pgrp == curproc->pid) {
  12. >>        struct tty *tty = (struct tty *)fp->devinfo;
  13. >>        if (curproc->pgrp == tty->pgrp)
  14. >>            tty->pgrp = 0;
  15. >            ^^^^^^^^^^^^^
  16. > i think this is a bug :-)
  17. >
  18. > no patch because i'm not sure what exactly to do here (well search for
  19. >another process that has the same ctty, but in what order... anyone?)
  20. >but you can reproduce the effect when you do something like `sh -c ps |less'
  21. >(tried with BSD sh and ksh) and then try to interrupt or stop less with
  22. >^C or ^Z.  either nothing happens (running on /dev/fasttext) or you kill
  23. >everything (running on toswin)...
  24.  
  25. I think I'm responsible for that code.  It was supposed to be a fix
  26. for the buggy job control code, which has been removed from MiNT.
  27. That code used a pgrp of 0 on a tty to indicate that it was "up for
  28. grabs" (the next process to read/write on the tty would become the tty
  29. owner).
  30.  
  31. I think it can be safely commented out now.  There should not be any
  32. need to change the process group at all, it should be OK to just leave
  33. it in owned by the exited process.
  34.  
  35. --
  36. entropy -- it's not just a good idea, it's the second law.
  37. Personal mail:      entropy@gnu.ai.mit.edu
  38. MiNT library mail:  entropy@terminator.rs.itd.umich.edu
  39.  
  40.  
  41.